package com.education.online.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Map;

@FeignClient(value = "user-service")
public interface UserFeign {
    //app端学生用户表
    @RequestMapping(value = "/app/user/findByUserId",method = RequestMethod.GET)
    public Map<String,String> findByUserId(@RequestParam(value = "userId", required = true)Integer userId);

    //pc后端管理登陆表
    @RequestMapping(value = "/k12main/sysUser/findByUserId",method = RequestMethod.GET)
    public Map<String,Object> findByPCUserId(@RequestParam(value = "userId", required = true)Integer userId);


    //修改用户达人币总数
    @RequestMapping(value = "/k12main/sysUser/updateByPCUserId",method = RequestMethod.PUT)
    public String updateByPCUserId(@RequestParam(value = "userId", required = true)Integer userId,
                                   @RequestParam(value = "price", required = true) BigDecimal price);
}
